In [1]:
from tdshub.gridlabd import Gridlabd
In [2]:
g = Gridlabd()
g.houses(10).evs(10).solar(10)
g.plot()
In [3]:
g.execute()
executed in 10.5900399685 seconds, (198755, 7)
Out[3]:
<tdshub.gridlabd.interface.gridlabd.Gridlabd at 0x10e06e650>
In [4]:
df = g.df()
In [5]:
df.head()
Out[5]:
timestamp object attribute name attr_group house_group value
0 2013-07-01 04:00:00 evcharger_det arrival_at_home evcharger_det_0 arrival_at_home house_3 1824
1 2013-07-01 04:00:00 evcharger_det arrival_at_home evcharger_det_1 arrival_at_home house_0 1724
2 2013-07-01 04:00:00 evcharger_det arrival_at_home evcharger_det_2 arrival_at_home house_7 1604
3 2013-07-01 04:00:00 evcharger_det arrival_at_home evcharger_det_3 arrival_at_home house_6 1924
4 2013-07-01 04:00:00 evcharger_det arrival_at_home evcharger_det_4 arrival_at_home house_8 1646
In [7]:
(df.vmask('attr_group', 'power')
   .vmask('object', 'triplex_meter')
   .pivot_table(index="timestamp", columns='name', values='value', aggfunc="sum")
   .sum(axis=1)).plotly()
In [ ]: